<template>
	<view class="shipin">
		<!-- 视频播放器 -->
		<view class="uni-padding-wrap uni-common-mt">
			<view>
				<video class="videx" id="myVideo" :src="juji.movieUrl" controls></video>
			</view>
		</view>
		
		<!-- 剧集简介 -->
		<view class="juji_jj">
			<text class="juji_jj_t">{{juji.currentName}}</text>
			<rich-text class="juji_jj_c" :nodes='juji.intr'>
			</rich-text>
		</view>
		<!-- 视频剧集 -->
		<view class="juji">
			<text v-for="(itam,index) in juji.movies" @click="bof(itam.movieId)">{{itam.movieName}}</text>
		</view>
		<!-- 横线 -->
		<!-- <hengxian></hengxian> -->
		
		
	</view>
</template>

<script>
	export default {
	    data() {
	        return {
				id:[],
				juji:[]
	        }
	    },
		onLoad(option) {
			this.id = option.id
			console.log(this.id)
		},
		created() {
			let that = this
			 // this.bofang2(that.id)
			 let params = {
			 	"seriesId":this.id
			 }
			 that.pyReq(that.$http.getMovieDetail2,params,function(res){
			 		  that.juji = res.result;
					  uni.setNavigationBarTitle({
					  　　title:that.juji.seriesName
					  })
			 });
			 
		},
	    methods: {
	        // videoErrorCallback: function(e) {
	        //     uni.showModal({
	        //         content: e.target.errMsg,
	        //         showCancel: false
	        //     })
	        // }
			bof(id){
				console.log(id)
				this.bofang(id)
			},
			bofang(id){
				let that = this
				let params = {
					"id":id
				}
				that.pyReq(that.$http.getMovieDetail,params,function(res){
						  that.juji = res.result
						  console.log(that.juji);
				});
			},
			bofang2(id){
				let that = this
				let params = {
					"id":id
				}
				that.pyReq(that.$http.getMovieDetailAPP,params,function(res){
						  that.juji = res.result
						  console.log(that.juji);
				});
				// let headers={
				// 	  'content-type': 'application/x-www-form-urlencoded',
				// 	  'token': uni.getStorageSync('token')
				// }
				// uni.request({
				// 	  url: that.$http.getMovieDetailAPP,
				// 	  method: 'POST',
				// 	  data:params,
				// 	  header:headers,
				// 	  success: (res)=>{
				// 		  console.log(res)
				// 		  that.juji = res.data.result
				// 	  },
				// 	  fail: (err)=>{
				// 		  console.log(err)
				// 	  }
				// })  
			}
	    }
	}
</script>

<style>
	.shipin{
		/* margin: 30upx 30upx; */
	}
	.videx{
		width: 664upx;
		height: 447upx;
		margin-left: 10upx;
	}
	.juji{
		margin: 0upx 50upx;
		padding: 20upx 0;
		/* display: flex;
		flex-wrap: wrap;
		justify-content: space-between; */
	}
	.juji text{
		width: 193upx;
		display: inline-block;
		font-size: 24upx;
		overflow: hidden;
		text-overflow:ellipsis;
		white-space: nowrap;
		margin: 20upx 0;
		margin-right: 18px;
	}
	.juji text:nth-child(3n){
		margin-right: 0;
	}
	.juji_jj{
		 margin: 30upx 40upx; 
	}
	.juji_jj text{
		display: block;
	}
	.juji_jj_t{
		font-size:30upx;
		font-weight: 700;
	}
	.juji_jj_c{
		font-size: 26upx;
		line-height: 50upx;
		margin: 20upx 0;
	}
</style>
